import { createApp } from 'vue'
import ZyLoading from '@/components/ZyLoading/index.js'
// 瀑布流插件
import { VueMasonryPlugin } from 'vue-masonry'

import App from './App.vue'
import router from './router'
import pinia from '@/stores'

// 引入初始化样式文件
import '@/styles/index.scss'
// 引入svg图标
import 'virtual:svg-icons-register'
// 路由守卫
import '@/permission.js'

// 引入全局组件插件
import { componentPlugin } from '@/components'

const app = createApp(App)

// 注册全局组件
app.use(componentPlugin)
app.use(router)
app.use(pinia)
app.use(VueMasonryPlugin)
app.directive('zy-loading', ZyLoading)

app.mount('#app')
